import os
import logging
import asyncio
from dotenv import load_dotenv
from aiogram import Bot, Dispatcher, types, utils
from aiogram.contrib.middlewares.logging import LoggingMiddleware

load_dotenv()

logging.basicConfig(level=logging.INFO)
bot = Bot(token=os.getenv('TOKEN'))
dp = Dispatcher(bot)
dp.middleware.setup(LoggingMiddleware())

START_TEXT = (
    """<b>HELLO WORLD!!!</b>"""
)

# Обработка команды /start с использованием декоратора message_handler
@dp.message_handler(commands=['start'])
async def send_start(message: types.Message):
    markup = types.InlineKeyboardMarkup()
    next_button = types.InlineKeyboardButton("Далее", callback_data="next")
    markup.add(next_button)
    await message.answer(text=START_TEXT, reply_markup=markup, parse_mode=types.ParseMode.HTML)

@dp.message_handler(commands=['dev'])
async def send_dev(message: types.Message):
    markup = types.InlineKeyboardMarkup()
    info_button = types.InlineKeyboardButton("\U0001F98A Source", callback_data="code",
                                             url='https://github.com/nikohakerinc/')
    markup.add(info_button)
    await message.answer(text='Created by @Niko_from_Niko', reply_markup=markup)

if __name__ == '__main__':
    utils.executor.start_polling(dp, skip_updates=True)